import type { MaybeRef } from '@vueuse/core'
import { computed, unref } from 'vue'
import { ProductEnum } from '@/core/enums/platform'

export function useCategory(type?: MaybeRef<ProductEnum>) {
  return {
    // 词包百姓版   2
    CiBao: computed(() => {
      const category = unref(type)
      return category === ProductEnum.CiBao
    }),
    BW: computed(() => {
      const category = unref(type)
      return category === ProductEnum.BW
    }),
    HJBW: computed(() => {
      const category = unref(type)
      return category === ProductEnum.HJBW
    }),
    //   5
    BWYXB: computed(() => {
      const category = unref(type)
      return category === ProductEnum.BWYXB
    }),
    //词包百搜版   6
    CBYXB: computed(() => {
      const category = unref(type)
      return category === ProductEnum.CBYXB
    }),
    //词包特惠-百搜版  7
    CBTEH: computed(() => {
      const category = unref(type)
      return category === ProductEnum.CBTEH
    }),
    //精准词词包  9
    WBTEH: computed(() => {
      const category = unref(type)
      return category === ProductEnum.WbBao
    }),
    // 词包特惠-百姓版  10
    DFTEH: computed(() => {
      const category = unref(type)
      return category === ProductEnum.DFBEN
    }),
    //  特惠版本页面百姓版  11
    DFTEX: computed(() => {
      const category = unref(type)
      return category === ProductEnum.DFBEX
    }),
    // GiBao: computed(() => {
    //   const category = unref(type)
    //   return category === ProductEnum.GiBao
    // })
    BWSD: computed(() => {
      const category = unref(type)
      return category === ProductEnum.BWSD
    }),
    BWSDYXB: computed(() => {
      const category = unref(type)
      return category === ProductEnum.BWSDYXB
    })
  }
}
